Seismo-Live: http://seismo-live.org
%matplotlib inline
import matplotlib.pyplot as plt
plt.style.use("bmh")
plt.rcParams['figure.figsize'] = 10, 6
data/GR.FUR..BHN.D.2015.361
(station FUR
, LMU geophysical observatory in Fürstenfeldbruck)data/station_FUR.stationxml
from obspy import read, read_inventory
st = read("data/GR.FUR..BHN.D.2015.361")
inv = read_inventory("data/station_FUR.stationxml")
print(st)
print(inv)
inv.plot(projection="ortho");
PPSD
class from obspy.signal, see http://docs.obspy.org/tutorial/code_snippets/probabilistic_power_spectral_density.html (but use the inventory you read from StationXML as metadata)PPSD
(plot()
method attached to PPSD
object)from obspy.signal import PPSD
tr = st[0]
ppsd = PPSD(stats=tr.stats, metadata=inv)
ppsd.add(tr)
ppsd.plot()
Since longer term stacks would need too much waveform data and take way too long to compute, we prepared one year continuous data preprocessed for a single channel of station FUR
to play with..
PPSD_FUR_HHN.npz
using PPSD
's load_npz()
staticmethod (i.e. it is called directly from the class, not an instance object of the class)max_percentage
option of plot()
option) (might take a couple of minutes..!)from obspy.signal import PPSD
ppsd = PPSD.load_npz("data/PPSD_FUR_HHN.npz")
ppsd.plot(max_percentage=10)
ppsd.plot(cumulative=True)
calculate_histogram()
(see docs!) method of PPSD
and visualize themcallback
option and use some crazy custom callback function in calculate_histogram()
, e.g. stack together all data from birthdays in your family.. or all German holidays + Sundays in the time span.. or from dates of some bands' concerts on a tour.. etc.ppsd.calculate_histogram(time_of_weekday=[(-1, 0, 2), (-1, 22, 24)])
ppsd.plot(max_percentage=10)
ppsd.calculate_histogram(time_of_weekday=[(-1, 8, 16)])
ppsd.plot(max_percentage=10)
calculate_histogram()
(see docs!) method of PPSD
and visualize themppsd.calculate_histogram(time_of_weekday=[(1, 0, 24), (2, 0, 24), (3, 0, 24), (4, 0, 24), (5, 0, 24)])
ppsd.plot(max_percentage=10)
ppsd.calculate_histogram(time_of_weekday=[(6, 0, 24), (7, 0, 24)])
ppsd.plot(max_percentage=10)
calculate_histogram()
(see docs!) method of PPSD
and visualize themppsd.calculate_histogram(month=[10, 11, 12, 1])
ppsd.plot(max_percentage=10)
ppsd.calculate_histogram(month=[4, 5, 6, 7])
ppsd.plot(max_percentage=10)
calculate_histogram()
(see docs!) method of PPSD
and visualize them